<%@ page language="java" contentType="text/html; charset=UTF-8" 
    pageEncoding="UTF-8"%>
<div title="详细信息"  style="height:auto;padding:10px 20px;">
	<div class="ftitle">资源详细信息</div>
	<div class="cdetail">
		<div class="fitem">
			<span class="fitem_name">名称 : </span><span id="file_view_name"></span>
		</div>
		<div class="fitem">
			<span class="fitem_name">所有人 : </span><span id="file_view_owner"></span>
		</div>
		<div class="fitem">
			<span class="fitem_name">添加时间 : </span><span id="file_view_addTime"></span>
		</div>
		<div class="fitem">
			<span class="fitem_name">上次修改人 : </span><span id="file_view_lastEdit"></span>
		</div>
		<div class="fitem">
			<span class="fitem_name">上次修改时间 : </span><span id="file_view_lastEditTime"></span>
		</div>
		<div class="fitem">
			<span class="fitem_name">安全级别 : </span><span id="file_view_level"></span>
		</div>
		<div class="fitem">
			<span class="fitem_name">描述 : </span><span id="file_view_desc"></span>
		</div>
	</div>
</div>
<script type="text/javascript">
(function( viewResourceJs, $, undefined ) {
	function getResourceID(){
		return <%=request.getParameter("id")%>;
	};
	function getResourceType(){
		return '<%=request.getParameter("type")%>';
	};
	viewResourceJs.init = function()
	{
		workbenchJs.loadData("dispatch/utility/file/query?id="+getResourceID()+"&type="+getResourceType(),viewResourceJs.loadResourceResult,"加载文件信息");
	};
	
	viewResourceJs.loadResourceResult = function(data)
	{
		var res = data.result;
        if(res == "SUCCESS")
        {
        	var value = jQuery.parseJSON(data.payload.value);
        	$('#file_view_name').html(value.name);
        	$('#file_view_owner').html(value.owner);
        	$('#file_view_addTime').html(value.createTime);
        	$('#file_view_lastEdit').html(value.lastUpdateUser);
        	$('#file_view_lastEditTime').html(value.lastUpdateTime);
        	$('#file_view_level').html(value.level);
        	$('#file_view_desc').html(value.description);
        }else if(res == "COMPONENT_ERROR")
        {
        	$.messager.alert("Error",data.payload.value);
        }else
        {
        	$.messager.alert("Error",data.result);
        }
	};
}( window.viewResourceJs = window.viewResourceJs || {}, jQuery ));

$(function(){
	viewResourceJs.init();
});
</script>
<style type="text/css">

 </style>